<?php
class Factory{
    public static $class;
    public static function Once($className,$config){
        if(!isset(static::$class[$className])){
            static::$class[$className] = new $className($config);
        }
        return static::$class[$className];
    }
}
?>